package com.timeriver.domain.vo;

import com.timeriver.domain.enums.ModelCategory;
import com.timeriver.domain.enums.StatusCategory;
import lombok.Data;
import lombok.ToString;

@Data
@ToString
public class ModelVO {

    private String id;

    private String name;

    private String description;

    private String categoryName;

    /** 模型预测请求数据格式类型：JSON字符串 */
    private String dataFormat;

    private Integer currentVersion;

    private String secretKey;

    private String topicName;

    private String statusName;

    private Integer status;

    private Integer category;

    public String getCategoryName() {
        return this.categoryName == null ? ModelCategory.getName(this.category) : this.categoryName;
    }

    public String getStatusName() {
        return this.statusName == null ? StatusCategory.getName(this.status) : this.statusName;
    }
}
